1. Field of the Invention
The present invention relates to an image processing system, an image processing apparatus, an image processing method, and a storage medium.
2. Related Background Art
In a conventional image processing system constructed using an image reading apparatus and a host computer, an image signal obtained by the image reading apparatus is subjected to various image processing when being transferred to the host computer. For instance, the image signal is subjected to gamma correction and the like in order to display high-gradation images on a monitor display of the host computer.
To facilitate understanding of the problem to be solved by the present invention, an example that is conceived as a comparison example of the present invention is first described with reference to FIG. 2. In this example, the stated image processing is mainly performed by the image reading apparatus.
In this drawing, reference numeral 1 denotes a CCD; 2, an A/D converter that converts an analog electric signal generated by a photoelectric conversion operation of the CCD into a digital signal; 3, a line offset that obtains signals in respective colors of RGB by separating the digital signal sent from the A/D converter 2 in a state where these signals in RGB are mixed together; reference symbol 8a, a RAM that is a memory used by the line offset 3; reference numeral 4, a matrix circuit that generates a luminance signal and a color difference signal from the three primary color signals; 5, a lookup table (hereinafter referred to as the “LUT”) including a gamma correction circuit that performs exponential conversion (hereinafter referred to as the “gamma correction”) on the RGB signals according to display on a monitor, numeral 8b a RAM that is a memory used by the LUT 5; 6, an interface circuit (hereinafter referred to as the “I/F”) that outputs the image signals to an external personal computer (hereinafter referred to as the “PC”) 7; and reference symbol 8c, a RAM that is a memory used by the I/F 6.
If the sizes of the image signals outputted from the image reading apparatus are too large, this may cause a significant reduction in processing speed due to various factors, such as the limitation of the rate of data transfer over a cable between the image reading apparatus and the PC 7 (a host computer in this example) and the limitation of the throughput of the PC7 that processes the image signals outputted from the image reading apparatus.
Also, in general, the number of gradations of an image that can be displayed by a display provided for the PC 7 is up to eight bits, so that the image reading apparatus converts each image signal into an 8-bit gradation image signal and transmits it to the PC 7.
In usual cases, the A/D converter 2 converts the analog signal sent from the CCD 1 into a 12-bit to 16-bit gradation image signal by performing an A/D conversion operation. Then, the line offset 3 obtains signals in RGB by separating the signal that was sent from the A/D converter 2 in a state where these signals in RGB are mixed together. These signals are each converted by the matrix circuit 4 into a 12-bit to 16-bit signal. Then, the 12-bit to 16-bit signal is converted into an 8-bit signal by the LUT 5 and the 8-bit signal is sent to the PC 7.
Another comparison example of the present invention is next described with reference to FIG. 3. This drawing shows a case where a large portion of the stated image processing is performed by the PC.
In this drawing, a signal obtained by a CCD 21 is A/D converted by an A/D converter 22 and is sent to a PC 28 via an I/F 23 that outputs signals to the outside. In the PC 28, a line offset 24 processes the signal sent via the I/F 23 in the same manner as the line offset 3 described above. Then, each signal outputted from the line offset 24 is subjected to matrix conversion by a matrix circuit 25 and is subjected to gamma correction by an LUT 26. Following this, image display is performed.
In this case, the CCD 21 performs photoelectric conversion to obtain an image signal and the image signal is usually A/D converted into an 8-bit signal by the A/D converter 22. All processing after this A/D conversion, which is to say the processing from the transmission to the PC 28 via the I/F 23 to the processing by the LUT 26, is performed in units of eight bits.
In the case shown in FIG. 2, there is a problem that an increase in cost is inevitable because there are provided three RAMs in the image reading apparatus.
Also, in the case shown in FIG. 3, there occurs a problem called “tone jump” that will be described in detail below.
The reason for which tone jump occurs is described. In the case shown in FIG. 3, it is necessary that the LUT 26 processes signals outputted from the image reading apparatus by performing inverse gamma correction according to the gamma characteristic of a display. In the case of a PC with a Microsoft Windows operating system, gamma correction is generally performed by applying a gamma of 1/2.2. The following is a description of a case where a PC with the Microsoft Windows operating system performs gamma correction by applying a gamma of 1/2.2. FIG. 5 shows three output gradation levels for each input gradation level in dark portions (at 0th to 80th gradation levels out of 256 gradation levels). In this drawing, a gamma of 1/2.2 is applied to 8-bit gradation image signals. Also, in this drawing, the top row shows input levels and lower rows show output levels obtained from each input level, with these output levels corresponding to conversion of an 8-bit input signal into an 8-bit output signal, conversion of a 12-bit input signal into an 8-bit signal, and conversion of a 16-bit signal into an 8-bit signal, respectively.
In the case shown in FIG. 3, a signal inputted into the LUT 26 and a signal outputted from the LUT 26 are both an 8-bit signal, so that the case shown in FIG. 3 corresponds to the case marked (1) in FIG. 5. Therefore, assuming that an inverse gamma of 1/2.2 is applied to an input signal at an nth gradation level, the gradation level of a corresponding output signal is obtained from a calculation of 256×(n/256)(1/2.2). That is, in the case shown in FIG. 3, when a signal at the 1st level is inputted, this input signal results in an output signal at the 21st level due to the application of the gamma coefficient of 1/2.2. Consequently, it is impossible to generate output signals at the 0th to 20th levels from input signals at the 1st and higher levels. Similarly, when a signal at the 2nd level is inputted, a signal at the 28th level is outputted, as shown in FIG. 5. In other words, when the gamma coefficient of 1/2.2 is applied in the case shown in FIG. 3 where an input image signal and an output image signal are both an 8-bit signal, output signals at the 0th to 20th levels (in the vicinity of dark levels) are not generated, as indicated by an example of a histogram shown in FIG. 4. As a result, there occurs the “tone jump” problem.
It should be noted here that in FIG. 4, the horizontal axis represents output gradation levels and the vertical axis represents the occurrence frequency of each output gradation level in a given image of one screen. Also, note that in the case shown in FIG. 2, a 12-bit to 16-bit signal is inputted into the LUT 5 and an 8-bit signal is outputted therefrom. In this case, as can be seen from the cases marked (2) and (3) in FIG. 5, the occurrence frequency of tone jump is reduced, in comparison with the case shown in FIG. 3 (corresponding to the case marked (1) in FIG. 5) where a signal inputted into the LUT 26 and a signal outputted from the LUT 26 are both an 8-bit signal. In the case shown in FIG. 2, however, there is a problem that three RAMs are provided in the image reading apparatus and therefore an increase in cost is inevitable. On the other hand, in the case shown in FIG. 3, the number of RAMs installed in the image reading apparatus is reduced to one. As a result, in this case, it is possible to reduce the cost of the image reading apparatus, in comparison with the case shown in FIG. 2, although the occurrence frequency of tone jump is increased as described above. Also, if not an 8-bit signal but a 12-bit to 16-bit signal is sent from the image reading apparatus to the PC in the case shown in FIG. 3, it is possible to reduce the occurrence frequency of tone jump. In this case, however, there is a problem in that the amount of data to be sent is increased and therefore the time period for transferring image signals is increased several fold. This means that the transfer of a 12-bit to 16-bit signal to the PC is not a realistic solution.